package com.linkhub.oms.admin.modules.user.bankstatement.excel.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.linkhub.oms.admin.modules.user.bankstatement.excel.enums.CurrencyTypeCellMappingEnum;
import com.linkhub.oms.component.excel.annotation.CellPropertyMapping;
import com.linkhub.oms.component.excel.annotation.RequiredProperty;
import com.linkhub.oms.component.excel.converter.CellEnumIntegerConverter;
import com.linkhub.oms.component.excel.converter.LocalDateConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * BankStatementExcelDataDTO
 *
 * @author Frank
 */
@Data
public class BankStatementExcelDataDTO implements Serializable {

    public final static String FIELD_USER_CARD_NUMBER = "userCardNumber";
    public final static String FIELD_RECEIVED_BANK_STATEMENT = "receivedBankStatement";

    @ApiModelProperty(value = "客户银行卡账号")
    @ExcelProperty(index = 0)
    @RequiredProperty
    public String userCardNumber;

    @ApiModelProperty(value = "公司银行卡账号")
    @ExcelProperty(index = 1)
    @RequiredProperty
    private String companyCardNumber;

    @ApiModelProperty(value = "转账金额")
    @ExcelProperty(index = 2)
    @RequiredProperty
    private String transferAmount;

    @ApiModelProperty(value = "实际到账金额")
    @ExcelProperty(index = 3)
    @RequiredProperty
    private String receivedAmount;

    @ApiModelProperty(value = "实际到账金额币种")
    @ExcelProperty(index = 4, converter = CellEnumIntegerConverter.class)
    @RequiredProperty
    @CellPropertyMapping(mappingEnum = CurrencyTypeCellMappingEnum.class)
    private Integer receivedCurrencyType;

    @ApiModelProperty(value = "手续费金额")
    @ExcelProperty(index = 5)
    @RequiredProperty
    private String fee;

    @ApiModelProperty(value = "手续费币种")
    @ExcelProperty(index = 6, converter = CellEnumIntegerConverter.class)
    @RequiredProperty
    @CellPropertyMapping(mappingEnum = CurrencyTypeCellMappingEnum.class)
    private Integer feeCurrencyType;

    @ApiModelProperty(value = "实际到账日期")
    @ExcelProperty(index = 7, converter = LocalDateConverter.class)
    @RequiredProperty
    private LocalDate receivedDate;

    @ApiModelProperty(value = "到账银行流水号")
    @ExcelProperty(index = 8)
    @RequiredProperty
    public String receivedBankStatement;

}
